<!DOCTYPE html>
<html lang=zh>
<head>
    <!-- so meta -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="HandheldFriendly" content="True">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5" />
    <meta name="description" content="提交 （ commit ）git add . 加入所有文件到暂存区 git add &lt;fileName&gt; 将指定文件加入到暂存区 git reset &lt;fileName&gt; 将指定文件从暂存区移除 文件状态 Untracked 新建文件后 Unmodified: commit 后 Modified: 有过commit记录的文件再修改 Staged:  git add 后  回">
<meta property="og:type" content="article">
<meta property="og:title" content="git基本使用">
<meta property="og:url" content="https://danyuan30.gitee.io/2022/02/02/frontend/git%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8/index.html">
<meta property="og:site_name" content="柯里的语法糖">
<meta property="og:description" content="提交 （ commit ）git add . 加入所有文件到暂存区 git add &lt;fileName&gt; 将指定文件加入到暂存区 git reset &lt;fileName&gt; 将指定文件从暂存区移除 文件状态 Untracked 新建文件后 Unmodified: commit 后 Modified: 有过commit记录的文件再修改 Staged:  git add 后  回">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://codertzm.oss-cn-chengdu.aliyuncs.com/image-20220202105320435.png">
<meta property="og:image" content="https://codertzm.oss-cn-chengdu.aliyuncs.com/image-20220201195048944.png">
<meta property="og:image" content="https://codertzm.oss-cn-chengdu.aliyuncs.com/image-20220201195104717.png">
<meta property="og:image" content="https://codertzm.oss-cn-chengdu.aliyuncs.com/image-20220202110517443.png">
<meta property="article:published_time" content="2022-02-02T03:14:25.000Z">
<meta property="article:modified_time" content="2022-03-05T12:31:10.768Z">
<meta property="article:author" content="柯里的语法糖">
<meta property="article:tag" content="git">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://codertzm.oss-cn-chengdu.aliyuncs.com/image-20220202105320435.png">
    
    
      
        
          <link rel="shortcut icon" href="https://codertzm.oss-cn-chengdu.aliyuncs.com/favicon.ico">
        
      
      
        
          <link rel="icon" type="image/png" href="https://codertzm.oss-cn-chengdu.aliyuncs.com/favicon.ico" sizes="192x192">
        
      
      
        
          <link rel="apple-touch-icon" sizes="180x180" href="https://codertzm.oss-cn-chengdu.aliyuncs.com/favicon.ico">
        
      
    
    <!-- title -->
    <title>git基本使用</title>
    <!-- styles -->
    
<link rel="stylesheet" href="/css/style.css">

    <!-- persian styles -->
    
    <!-- rss -->
    
    
	<!-- mathjax -->
	
<meta name="generator" content="Hexo 6.0.0"></head>

<body class="max-width mx-auto px3 ltr">
    
      <div id="header-post">
  <a id="menu-icon" href="#" aria-label="Menu"><i class="fas fa-bars fa-lg"></i></a>
  <a id="menu-icon-tablet" href="#" aria-label="Menu"><i class="fas fa-bars fa-lg"></i></a>
  <a id="top-icon-tablet" href="#" aria-label="Top" onclick="$('html, body').animate({ scrollTop: 0 }, 'fast');" style="display:none;"><i class="fas fa-chevron-up fa-lg"></i></a>
  <span id="menu">
    <span id="nav">
      <ul>
        <!--
       --><li><a href="/">首页</a></li><!--
     --><!--
       --><li><a href="/tags/">标签</a></li><!--
     --><!--
       --><li><a href="/categories/">分类</a></li><!--
     --><!--
       --><li><a href="/archives/">归档</a></li><!--
     --><!--
       --><li><a target="_blank" rel="noopener" href="http://github.com/twitzz">项目</a></li><!--
     --><!--
       --><li><a href="/about/">关于</a></li><!--
     --><!--
       --><li><a href="/search/">搜索</a></li><!--
     -->
      </ul>
    </span>
    <br/>
    <span id="actions">
      <ul>
        
        <li><a class="icon" aria-label="上一篇" href="/2022/02/05/JavaScript/ES6+/"><i class="fas fa-chevron-left" aria-hidden="true" onmouseover="$('#i-prev').toggle();" onmouseout="$('#i-prev').toggle();"></i></a></li>
        
        
        <li><a class="icon" aria-label="下一篇" href="/2021/12/18/JavaScript/eventLoop/"><i class="fas fa-chevron-right" aria-hidden="true" onmouseover="$('#i-next').toggle();" onmouseout="$('#i-next').toggle();"></i></a></li>
        
        <li><a class="icon" aria-label="返回顶部" href="#" onclick="$('html, body').animate({ scrollTop: 0 }, 'fast');"><i class="fas fa-chevron-up" aria-hidden="true" onmouseover="$('#i-top').toggle();" onmouseout="$('#i-top').toggle();"></i></a></li>
        <li><a class="icon" aria-label="分享文章" href="#"><i class="fas fa-share-alt" aria-hidden="true" onmouseover="$('#i-share').toggle();" onmouseout="$('#i-share').toggle();" onclick="$('#share').toggle();return false;"></i></a></li>
      </ul>
      <span id="i-prev" class="info" style="display:none;">上一篇</span>
      <span id="i-next" class="info" style="display:none;">下一篇</span>
      <span id="i-top" class="info" style="display:none;">返回顶部</span>
      <span id="i-share" class="info" style="display:none;">分享文章</span>
    </span>
    <br/>
    <div id="share" style="display: none">
      <ul>
  <li><a class="icon" target="_blank" rel="noopener" href="http://www.facebook.com/sharer.php?u=https://danyuan30.gitee.io/2022/02/02/frontend/git%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8/"><i class="fab fa-facebook " aria-hidden="true"></i></a></li>
  <li><a class="icon" target="_blank" rel="noopener" href="https://twitter.com/share?url=https://danyuan30.gitee.io/2022/02/02/frontend/git%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8/&text=git基本使用"><i class="fab fa-twitter " aria-hidden="true"></i></a></li>
  <li><a class="icon" target="_blank" rel="noopener" href="http://www.linkedin.com/shareArticle?url=https://danyuan30.gitee.io/2022/02/02/frontend/git%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8/&title=git基本使用"><i class="fab fa-linkedin " aria-hidden="true"></i></a></li>
  <li><a class="icon" target="_blank" rel="noopener" href="https://pinterest.com/pin/create/bookmarklet/?url=https://danyuan30.gitee.io/2022/02/02/frontend/git%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8/&is_video=false&description=git基本使用"><i class="fab fa-pinterest " aria-hidden="true"></i></a></li>
  <li><a class="icon" href="mailto:?subject=git基本使用&body=Check out this article: https://danyuan30.gitee.io/2022/02/02/frontend/git%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8/"><i class="fas fa-envelope " aria-hidden="true"></i></a></li>
  <li><a class="icon" target="_blank" rel="noopener" href="https://getpocket.com/save?url=https://danyuan30.gitee.io/2022/02/02/frontend/git%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8/&title=git基本使用"><i class="fab fa-get-pocket " aria-hidden="true"></i></a></li>
  <li><a class="icon" target="_blank" rel="noopener" href="http://reddit.com/submit?url=https://danyuan30.gitee.io/2022/02/02/frontend/git%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8/&title=git基本使用"><i class="fab fa-reddit " aria-hidden="true"></i></a></li>
  <li><a class="icon" target="_blank" rel="noopener" href="http://www.stumbleupon.com/submit?url=https://danyuan30.gitee.io/2022/02/02/frontend/git%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8/&title=git基本使用"><i class="fab fa-stumbleupon " aria-hidden="true"></i></a></li>
  <li><a class="icon" target="_blank" rel="noopener" href="http://digg.com/submit?url=https://danyuan30.gitee.io/2022/02/02/frontend/git%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8/&title=git基本使用"><i class="fab fa-digg " aria-hidden="true"></i></a></li>
  <li><a class="icon" target="_blank" rel="noopener" href="http://www.tumblr.com/share/link?url=https://danyuan30.gitee.io/2022/02/02/frontend/git%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8/&name=git基本使用&description="><i class="fab fa-tumblr " aria-hidden="true"></i></a></li>
  <li><a class="icon" target="_blank" rel="noopener" href="https://news.ycombinator.com/submitlink?u=https://danyuan30.gitee.io/2022/02/02/frontend/git%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8/&t=git基本使用"><i class="fab fa-hacker-news " aria-hidden="true"></i></a></li>
</ul>

    </div>
    <div id="toc">
      <ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%8F%90%E4%BA%A4-%EF%BC%88-commit-%EF%BC%89"><span class="toc-number">1.</span> <span class="toc-text">提交 （ commit ）</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%96%87%E4%BB%B6%E7%8A%B6%E6%80%81"><span class="toc-number">2.</span> <span class="toc-text">文件状态</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%9B%9E%E9%80%80-%EF%BC%88-reset-%EF%BC%89"><span class="toc-number">3.</span> <span class="toc-text">回退 （ reset ）</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#reset-%E7%9A%84%E6%A8%A1%E5%BC%8F"><span class="toc-number">3.1.</span> <span class="toc-text">reset 的模式</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%88%86%E6%94%AF-%EF%BC%88-branch-%EF%BC%89"><span class="toc-number">4.</span> <span class="toc-text">分支 （ branch ）</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%90%88%E5%B9%B6-%EF%BC%88-merge-%EF%BC%89"><span class="toc-number">5.</span> <span class="toc-text">合并 （ merge ）</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E8%BF%9C%E7%A8%8B%E4%BB%93%E5%BA%93-%EF%BC%88-remote-%EF%BC%89"><span class="toc-number">6.</span> <span class="toc-text">远程仓库 （ remote ）</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%8F%98%E5%9F%BA-%EF%BC%88-rebase-%EF%BC%89"><span class="toc-number">7.</span> <span class="toc-text">变基 （ rebase ）</span></a></li></ol>
    </div>
  </span>
</div>

    
    <div class="content index py4">
        
        <article class="post" itemscope itemtype="http://schema.org/BlogPosting">
  <header>
    
    <h1 class="posttitle" itemprop="name headline">
        git基本使用
    </h1>



    <div class="meta">
      <span class="author" itemprop="author" itemscope itemtype="http://schema.org/Person">
        <span itemprop="name">柯里的语法糖</span>
      </span>
      
    <div class="postdate">
      
        <time datetime="2022-02-02T03:14:25.000Z" itemprop="datePublished">2022-02-02</time>
        
      
    </div>


      
    <div class="article-category">
        <i class="fas fa-archive"></i>
        <a class="category-link" href="/categories/%E5%AE%9E%E6%88%98%E5%BC%80%E5%8F%91/">实战开发</a>
    </div>


      
    <div class="article-tag">
        <i class="fas fa-tag"></i>
        <a class="tag-link-link" href="/tags/git/" rel="tag">git</a>
    </div>


    </div>
  </header>
  

  <div class="content" itemprop="articleBody">
    <h2 id="提交-（-commit-）"><a href="#提交-（-commit-）" class="headerlink" title="提交 （ commit ）"></a>提交 （ commit ）</h2><p><code>git add .</code> 加入所有文件到暂存区</p>
<p><code>git add &lt;fileName&gt;</code> 将指定文件加入到暂存区</p>
<p><code>git reset &lt;fileName&gt;</code> 将指定文件从暂存区移除</p>
<h2 id="文件状态"><a href="#文件状态" class="headerlink" title="文件状态"></a>文件状态</h2><ul>
<li>Untracked 新建文件后</li>
<li>Unmodified: commit 后</li>
<li>Modified: 有过commit记录的文件再修改</li>
<li>Staged:  git add 后</li>
</ul>
<h2 id="回退-（-reset-）"><a href="#回退-（-reset-）" class="headerlink" title="回退 （ reset ）"></a>回退 （ reset ）</h2><p><code>git reset &lt;commitID&gt;</code> 将现有文件恢复到当时提交的状态</p>
<p><code>git reflog</code> 查看所有的操作记录，可以查到之前的 <code>commitID</code></p>
<p>如果想回到当前分支最新的commit，也可以使用 <code>git pull</code></p>
<h3 id="reset-的模式"><a href="#reset-的模式" class="headerlink" title="reset 的模式"></a>reset 的模式</h3><ul>
<li>–hard: 不保存所有变更</li>
<li>–sort: 保留变更且变更内容处于Staged</li>
<li>–mixed: 保留变更且变更内容处于Modified (不带参数，默认就是mixed)</li>
</ul>
<h2 id="分支-（-branch-）"><a href="#分支-（-branch-）" class="headerlink" title="分支 （ branch ）"></a>分支 （ branch ）</h2><p><code>git checkout -b &lt;name&gt; &lt;template&gt;</code> 创建分支，其中name表示新分支的名字，template表示以哪个分支或者commit为模板</p>
<p>如果 template 不是本地的，是来自远程仓库的话，则需要在 template 前面加个 origin</p>
<p><code>git checkout -b &lt;name&gt; origin &lt;template&gt;</code></p>
<p>例如： <code>git checkout -b bc-b origin bc-a</code> 的意思就是创建以远程的bc-a分支为模板的bc-b分支</p>
<p><img src="https://codertzm.oss-cn-chengdu.aliyuncs.com/image-20220202105320435.png" alt="image-20220202105320435"></p>
<p>模板：在一个分支中，一次次的commit都会被git记录，以这个分支为模板新切一个分支，新分支的commit记录会继承自模板分支，但是不同的分支之间没有关系</p>
<p><img src="https://codertzm.oss-cn-chengdu.aliyuncs.com/image-20220201195048944.png" alt="image-20220201195048944"></p>
<p><img src="https://codertzm.oss-cn-chengdu.aliyuncs.com/image-20220201195104717.png" alt="image-20220201195104717"></p>
<p><code>git checkout &lt;name&gt;</code> 切换分支</p>
<p><code>git branch</code> 查看所有分支</p>
<h2 id="合并-（-merge-）"><a href="#合并-（-merge-）" class="headerlink" title="合并 （ merge ）"></a>合并 （ merge ）</h2><p><code>git merge &lt;name&gt;</code> 合并分支，name表示分支名称</p>
<p>如果不同分支修改相同文件，可能会产生冲突，此时需要手动解决冲突再提交</p>
<h2 id="远程仓库-（-remote-）"><a href="#远程仓库-（-remote-）" class="headerlink" title="远程仓库 （ remote ）"></a>远程仓库 （ remote ）</h2><p><code>git push --set-upstream origin &lt;name&gt;</code> 推送到远端分支并且将远端分支设置为上流分支，name表示分支名</p>
<p><code>git fetch</code> 拉取远程仓库信息</p>
<p><code>git pull</code> 等同于 先 <code>git fetch</code> 再 <code>git merge</code></p>
<h2 id="变基-（-rebase-）"><a href="#变基-（-rebase-）" class="headerlink" title="变基 （ rebase ）"></a>变基 （ rebase ）</h2><p>使用 <code>git rebase &lt;name&gt;</code> 实现变基，发现产生冲突的话就解决冲突，然后将变更加入暂存区，接着使用 <code>git rebase --continue</code> 继续下一个节点的rebase</p>
<p>rebase 的原理就是枚举变更的 commit，依次变基</p>
<p><img src="https://codertzm.oss-cn-chengdu.aliyuncs.com/image-20220202110517443.png" alt="image-20220202110517443"></p>
<p>比如这个例子：如果此时我们在bc分支上，需要以最新的 master 版本为 base 提交 commit</p>
<p>使用 rebase，先拿出3号commit，然后以125为基础添加3号commit，再拿出4号commit，以1253为基础添加4号commit，直到所有的新增commit都完成变基</p>

  </div>
</article>



        
          <div id="footer-post-container">
  <div id="footer-post">

    <div id="nav-footer" style="display: none">
      <ul>
         
          <li><a href="/">首页</a></li>
         
          <li><a href="/tags/">标签</a></li>
         
          <li><a href="/categories/">分类</a></li>
         
          <li><a href="/archives/">归档</a></li>
         
          <li><a target="_blank" rel="noopener" href="http://github.com/twitzz">项目</a></li>
         
          <li><a href="/about/">关于</a></li>
         
          <li><a href="/search/">搜索</a></li>
        
      </ul>
    </div>

    <div id="toc-footer" style="display: none">
      <ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%8F%90%E4%BA%A4-%EF%BC%88-commit-%EF%BC%89"><span class="toc-number">1.</span> <span class="toc-text">提交 （ commit ）</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%96%87%E4%BB%B6%E7%8A%B6%E6%80%81"><span class="toc-number">2.</span> <span class="toc-text">文件状态</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%9B%9E%E9%80%80-%EF%BC%88-reset-%EF%BC%89"><span class="toc-number">3.</span> <span class="toc-text">回退 （ reset ）</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#reset-%E7%9A%84%E6%A8%A1%E5%BC%8F"><span class="toc-number">3.1.</span> <span class="toc-text">reset 的模式</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%88%86%E6%94%AF-%EF%BC%88-branch-%EF%BC%89"><span class="toc-number">4.</span> <span class="toc-text">分支 （ branch ）</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%90%88%E5%B9%B6-%EF%BC%88-merge-%EF%BC%89"><span class="toc-number">5.</span> <span class="toc-text">合并 （ merge ）</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E8%BF%9C%E7%A8%8B%E4%BB%93%E5%BA%93-%EF%BC%88-remote-%EF%BC%89"><span class="toc-number">6.</span> <span class="toc-text">远程仓库 （ remote ）</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%8F%98%E5%9F%BA-%EF%BC%88-rebase-%EF%BC%89"><span class="toc-number">7.</span> <span class="toc-text">变基 （ rebase ）</span></a></li></ol>
    </div>

    <div id="share-footer" style="display: none">
      <ul>
  <li><a class="icon" target="_blank" rel="noopener" href="http://www.facebook.com/sharer.php?u=https://danyuan30.gitee.io/2022/02/02/frontend/git%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8/"><i class="fab fa-facebook fa-lg" aria-hidden="true"></i></a></li>
  <li><a class="icon" target="_blank" rel="noopener" href="https://twitter.com/share?url=https://danyuan30.gitee.io/2022/02/02/frontend/git%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8/&text=git基本使用"><i class="fab fa-twitter fa-lg" aria-hidden="true"></i></a></li>
  <li><a class="icon" target="_blank" rel="noopener" href="http://www.linkedin.com/shareArticle?url=https://danyuan30.gitee.io/2022/02/02/frontend/git%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8/&title=git基本使用"><i class="fab fa-linkedin fa-lg" aria-hidden="true"></i></a></li>
  <li><a class="icon" target="_blank" rel="noopener" href="https://pinterest.com/pin/create/bookmarklet/?url=https://danyuan30.gitee.io/2022/02/02/frontend/git%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8/&is_video=false&description=git基本使用"><i class="fab fa-pinterest fa-lg" aria-hidden="true"></i></a></li>
  <li><a class="icon" href="mailto:?subject=git基本使用&body=Check out this article: https://danyuan30.gitee.io/2022/02/02/frontend/git%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8/"><i class="fas fa-envelope fa-lg" aria-hidden="true"></i></a></li>
  <li><a class="icon" target="_blank" rel="noopener" href="https://getpocket.com/save?url=https://danyuan30.gitee.io/2022/02/02/frontend/git%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8/&title=git基本使用"><i class="fab fa-get-pocket fa-lg" aria-hidden="true"></i></a></li>
  <li><a class="icon" target="_blank" rel="noopener" href="http://reddit.com/submit?url=https://danyuan30.gitee.io/2022/02/02/frontend/git%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8/&title=git基本使用"><i class="fab fa-reddit fa-lg" aria-hidden="true"></i></a></li>
  <li><a class="icon" target="_blank" rel="noopener" href="http://www.stumbleupon.com/submit?url=https://danyuan30.gitee.io/2022/02/02/frontend/git%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8/&title=git基本使用"><i class="fab fa-stumbleupon fa-lg" aria-hidden="true"></i></a></li>
  <li><a class="icon" target="_blank" rel="noopener" href="http://digg.com/submit?url=https://danyuan30.gitee.io/2022/02/02/frontend/git%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8/&title=git基本使用"><i class="fab fa-digg fa-lg" aria-hidden="true"></i></a></li>
  <li><a class="icon" target="_blank" rel="noopener" href="http://www.tumblr.com/share/link?url=https://danyuan30.gitee.io/2022/02/02/frontend/git%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8/&name=git基本使用&description="><i class="fab fa-tumblr fa-lg" aria-hidden="true"></i></a></li>
  <li><a class="icon" target="_blank" rel="noopener" href="https://news.ycombinator.com/submitlink?u=https://danyuan30.gitee.io/2022/02/02/frontend/git%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8/&t=git基本使用"><i class="fab fa-hacker-news fa-lg" aria-hidden="true"></i></a></li>
</ul>

    </div>

    <div id="actions-footer">
        <a id="menu" class="icon" href="#" onclick="$('#nav-footer').toggle();return false;"><i class="fas fa-bars fa-lg" aria-hidden="true"></i> 菜单</a>
        <a id="toc" class="icon" href="#" onclick="$('#toc-footer').toggle();return false;"><i class="fas fa-list fa-lg" aria-hidden="true"></i> 目录</a>
        <a id="share" class="icon" href="#" onclick="$('#share-footer').toggle();return false;"><i class="fas fa-share-alt fa-lg" aria-hidden="true"></i> 分享</a>
        <a id="top" style="display:none" class="icon" href="#" onclick="$('html, body').animate({ scrollTop: 0 }, 'fast');"><i class="fas fa-chevron-up fa-lg" aria-hidden="true"></i> 返回顶部</a>
    </div>

  </div>
</div>

        
        <footer id="footer">
  <div class="footer-left">
    Copyright &copy;
    
    
    2021-2022
    柯里的语法糖
  </div>
  <div class="footer-right">
    <nav>
      <ul>
        <!--
       --><li><a href="/">首页</a></li><!--
     --><!--
       --><li><a href="/tags/">标签</a></li><!--
     --><!--
       --><li><a href="/categories/">分类</a></li><!--
     --><!--
       --><li><a href="/archives/">归档</a></li><!--
     --><!--
       --><li><a target="_blank" rel="noopener" href="http://github.com/twitzz">项目</a></li><!--
     --><!--
       --><li><a href="/about/">关于</a></li><!--
     --><!--
       --><li><a href="/search/">搜索</a></li><!--
     -->
      </ul>
    </nav>
  </div>
</footer>

    </div>
    <!-- styles -->



  <link rel="preload" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.2/css/all.min.css" crossorigin="anonymous" onload="this.onload=null;this.rel='stylesheet'"/>


    <!-- jquery -->
 
  <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js" crossorigin="anonymous"></script> 




<!-- clipboard -->

  
    <script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.7/clipboard.min.js" crossorigin="anonymous"></script> 
  
  <script type="text/javascript">
  $(function() {
    // copy-btn HTML
    var btn = "<span class=\"btn-copy tooltipped tooltipped-sw\" aria-label=\"复制到粘贴板!\">";
    btn += '<i class="far fa-clone"></i>';
    btn += '</span>'; 
    // mount it!
    $(".highlight table").before(btn);
    var clip = new ClipboardJS('.btn-copy', {
      text: function(trigger) {
        return Array.from(trigger.nextElementSibling.querySelectorAll('.code')).reduce((str,it)=>str+it.innerText+'\n','')
      }
    });
    clip.on('success', function(e) {
      e.trigger.setAttribute('aria-label', "复制成功!");
      e.clearSelection();
    })
  })
  </script>


<script src="/js/main.js"></script>

<!-- search -->

<!-- Google Analytics -->

<!-- Baidu Analytics -->

<!-- Cloudflare Analytics -->

<!-- Umami Analytics -->

<!-- Disqus Comments -->

<!-- utterances Comments -->

</body>
</html>
